﻿<%@ Page Language="C#" MasterPageFile="~/ClientsMaster.master" AutoEventWireup="true" CodeFile="AceptPayments.aspx.cs" Inherits="Clients_AceptPayments" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cph_content" Runat="Server">
<h1>Potvrzení platby na požadavek</h1>
    <asp:Label ID="lbl_ZadnaHistorie" Visible="false" runat="server" Text="Váš účet neobsahuje žádne požadavky na platby" />

    <asp:GridView ID="GridView1" HtmlEncode="False" OnRowCommand="RowCommand" 
        Caption="Seznam požadavku na platbu" runat="server" 
        DataSourceID="sourceRequest" AutoGenerateColumns="False" Width="100%" 
        CellPadding="4" ForeColor="#333333" GridLines="None">
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <Columns>
           <asp:TemplateField HeaderText="Potvrzení">
                <ItemTemplate>
                    <asp:LinkButton  ItemStyle-Width="60px" ItemStyle-ForeColor="Green" runat="server" CommandName="Potvrdit" CommandArgument='<%#Eval("Id") %>' OnClientClick="javascript: return confirm('Opravdu chcete zaplatit pplatbu?');">Potvrdit</asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Zamítnutí">

                <ItemTemplate>
                    <asp:LinkButton ItemStyle-Width="60px" ItemStyle-ForeColor="Green" runat="server" CommandName="Zamitnout" CommandArgument='<%#Eval("Id") %>' OnClientClick="javascript: return confirm('Opravdu chcete zamítnout platbu?');">Zamitnout</asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
            
            
            <asp:BoundField DataField="CreationDate" HeaderText="Datum požadavku" DataFormatString="{0:dd/MM/yyyy}" />
            <asp:BoundField DataField="DueDate" HeaderText="Splatnost požadavku"  DataFormatString="{0:d}" />
            
                        <asp:TemplateField HeaderText="Obchodník">

                <ItemTemplate>
                    <asp:Label runat="server" Text='<%# DatabaseManager.getPersonByAccont(Eval("whom").ToString()).Email %>' />
                </ItemTemplate>
            </asp:TemplateField>
            
            <asp:BoundField DataField="amount" HeaderText="Částka" />
            <asp:BoundField DataField="comment" HeaderText="Komentář" />
        </Columns>
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#999999" />
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
    </asp:GridView>
    
    <asp:ObjectDataSource ID="sourceRequest" runat="server" 
        SelectMethod="getPaymentReguestByPersonId" TypeName="DatabaseManager">
        <SelectParameters>
            <asp:Parameter Name="from_account" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>



</asp:Content>

